using System;
using System.Collections.Generic;

namespace xmldict{
	
	/**
	 * This can be used for dictionary adapters
	 */
	
	public interface IMinimalDict {
		 
		object this[string keyList]{get; set;}
		int Count {get;}
		ICollection<string> Keys{get;}
		bool ContainsKey(string key);
		void Add(string key, object value);
		void Remove(string key);
		bool TryGetValue(string key, out object value);

		void Clear();
		void Update(IMinimalDict other);
		void Update(Dictionary<string, object> other);

		void CreateValue(string key);
		object NewValue(string key);
	}
	
	/**
	 * this interface don't extend IDictionary, because there no IEnumerable support
	 */
	public interface IDict:IMinimalDict {
		void addAllowed(params string [] keys);
		void delAllowed(params string [] keys);
		void addReadonly(params string [] keys);
		void delReadonly(params string [] keys);
		bool keyAllowed(string key);
		bool keyReadonly(string key);
		bool keyValid(string key);
	}
	
	public interface IFilter {
		object filterInto(string key, object data);
		object filterOut(string key, object data);
	}

	public interface IMinimalList {
		bool IsReadOnly{get;}
		int Count{get;}
		object this[int index] {get;}
		void Add(object data);
	}
}
